package com.service;

import com.dao.RecommendDao;
import com.entity.Goods;
import com.entity.LoginIn;
import com.entity.Orders;
import com.entity.ProductRecs;
import com.entity.Recommend;
import com.entity.Types;
import com.entity.UserRecs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author king
 * @date 2022/5/18 - 15:59
 */

@Service    // 注解为service层spring管理bean
@Transactional
public class RecommendService {

    @Autowired
    RecommendDao recommendDao;
    public UserRecs queryByUserId(Integer id) {
        return recommendDao.queryByUserId(id);
    }

    public List<Types> queryByType(List<Recommend> recommends) {
        return recommendDao.queryByType(recommends);
    }

    public List<LoginIn> queryByLogin(int id) {
        return recommendDao.queryByLogin(id);
    }

    public List<Orders> queryByTotal(int id) {
        return recommendDao.queryByTotal(id);
    }

    public List<Goods> queryByOrderId(int  orderId){
        return recommendDao.queryByOrderId(orderId);
    }

    public ProductRecs queryByGoodId(int goodid) {
        return recommendDao.queryByGoodId(goodid);
    }
}
